<?php


namespace App\Http\Controllers\Common;


use App\Services\SmsService;
use Illuminate\Http\Request;

class SmsController extends BaseController
{
    /**
     * @api {post} sms/captcha 03、验证短信
     * @apiName CommonSmsCaptcha
     * @apiGroup 99-Common
     * @apiVersion 1.0.0
     *
     * @apiParam {String} phone 手机号码
     * @apiParam {Number} mode 发送模式 1:号码存在时发送 2:号码不存在时发送 3:直接发送
     *
     * @apiSuccess {Number} code 成功返回标识为200，其他均为失败
     * @apiSuccess {String} message 响应结果描述
     *
     * @param Request $request
     * @param SmsService $service
     * @return bool
     * @throws \Exception
     */
    public function captcha(Request $request, SmsService $service) {
        return $service->captcha($request->input());
    }
}
